<?php

namespace bs;

use km\out\Layout;
use km\out\Template;

class Renderer {
	static function getView($template)
	{
		$view = new Template();
		$view->setPath(dirname(__FILE__) . '/../../views');
		$view->setTemplate($template);
		return $view;
	}
	/**
	 * @return Layout
	 */
	static function getLayout($template)
	{
		$layout = Layout::instance();
		$layout->setTemplate('layout.php');
		
		$layout->setView(self::getView($template));
		return $layout;
	}
	static function render()
	{
		Layout::instance()->render();
	}
}